package com.luzhikun.procinceAjax.model;

import java.util.Objects;

/**
 * @Author Rookie Coder
 * @Description 省份模型类
 * @Date
 **/
public class Privince {
    private Integer id;
    private String name;
    private String jiancheng;
    private String shenghui;

    public Privince() {
    }

    public Privince(Integer id, String name, String jiancheng, String shenghui) {
        this.id = id;
        this.name = name;
        this.jiancheng = jiancheng;
        this.shenghui = shenghui;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getJiancheng() {
        return jiancheng;
    }

    public void setJiancheng(String jiancheng) {
        this.jiancheng = jiancheng;
    }

    public String getShenghui() {
        return shenghui;
    }

    public void setShenghui(String shenghui) {
        this.shenghui = shenghui;
    }

    @Override
    public String toString() {
        return  name +","+ jiancheng ;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof Privince)) return false;
        Privince privince = (Privince) o;
        return Objects.equals(getId(), privince.getId()) && Objects.equals(getName(), privince.getName()) && Objects.equals(getJiancheng(), privince.getJiancheng()) && Objects.equals(getShenghui(), privince.getShenghui());
    }

    @Override
    public int hashCode() {
        return Objects.hash(getId(), getName(), getJiancheng(), getShenghui());
    }
}
